<?php



class OrdersProductsMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.OrdersProductsMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('orders_products');
		$tMap->setPhpName('OrdersProducts');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ORDERS_PRODUCTS_ID', 'OrdersProductsId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('ORDERS_ID', 'OrdersId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('PRODUCTS_ID', 'ProductsId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('PRODUCTS_MODEL', 'ProductsModel', 'string', CreoleTypes::VARCHAR, false, 12);

		$tMap->addColumn('PRODUCTS_NAME', 'ProductsName', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('PRODUCTS_PRICE', 'ProductsPrice', 'double', CreoleTypes::DECIMAL, true, 15);

		$tMap->addColumn('FINAL_PRICE', 'FinalPrice', 'double', CreoleTypes::DECIMAL, true, 15);

		$tMap->addColumn('PRODUCTS_TAX', 'ProductsTax', 'double', CreoleTypes::DECIMAL, true, 7);

		$tMap->addColumn('PRODUCTS_QUANTITY', 'ProductsQuantity', 'int', CreoleTypes::INTEGER, true, null);

	} 
} 